home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / amac34.arc / SRL.BAT < prev    next >
DOS Batch File  |  1991-02-16  |  914b  |  45 lines

  1. @echo off
  2. rem SRL.BAT for NON-case sensitive search/LOAD          Sat  02-16-1991
  3. rem Loads only files containing search text, no replacement made
  4. rem Requires FGREP.COM
  5. rem Requires INPUT.COM
  6. rem "Enter" without any search text terminates batch file
  7.  
  8. CLS
  9.      IF not "%1" == "" IF "%2" == "" goto NOINPUT
  10. INPUT Search Text=/b
  11.      IF Errorlevel=1 goto END
  12. SET  FGS=%ANS%
  13. GOTO SEARCH
  14. :NOINPUT
  15. SET  FGS=%1
  16.  
  17. :SEARCH
  18. ECHO 
  19. ECHO Searching For Files Containing '%FGS%' , NO Replacement .....
  20. ECHO *** NON-CASE SENSITIVE SEARCH/LOAD FILES CONTAINING SEARCH TEXT ***
  21. ECHO 
  22. BREAK on
  23.  
  24. if not exist SRCH-FG.LST   GOTO NEXT1
  25. GOTO NEXT2
  26.  
  27. :NEXT1
  28. FGREP  -f /%FGS%/ *.*         >c:$.ql
  29.  
  30. :NEXT2
  31. if exist SRCH-FG.LST GOTO NEXT3
  32. GOTO NEXT4
  33.  
  34. :NEXT3
  35. FGREP -f /%FGS%/ @SRCH-FG.LST >c:$.ql
  36.  
  37. :NEXT4
  38.  
  39. BREAK off
  40. ECHO 
  41. COPY c:$.ql c:!
  42. Q.EXE       c:!    /Esrl.mac     /LSRCH22.mac
  43. ECHO 
  44. :END
  45.